﻿@model SIFIET.Models.Question
@{
    ViewBag.Title = "Crear Pregunta del Tema " + @ViewBag.Topic.Description;
}

<div class="grid">
    <div class="c12">
        <h2>
            Crear Pregunta del Tema <strong><i>@ViewBag.Topic.Description </i></strong>
        </h2>
        <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    </div>
    <div class="c12">
        <div class="c9 first" id="content">
            @using (Html.BeginForm())
            {
                @Html.ValidationSummary(true)
                <fieldset>
                    <legend>Pregunta</legend>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Type)
                    </div>
                    <div class="editor-field">
                        <p>
                            @Html.RadioButtonFor(model => model.Type, "Unica", true) Unica Respuesta
                            <br />
                            @Html.RadioButtonFor(model => model.Type, "Multiple", false) Multiple Respuesta
                            <br />
                            @Html.RadioButtonFor(model => model.Type, "Corta", false) Respuesta Abierta Corta
                            <br />
                            @Html.RadioButtonFor(model => model.Type, "Larga", false) Respuesta Abierta Larga
                            <div class="alert error">
                                @Html.ValidationMessageFor(model => model.Type)
                            </div>
                        </p>
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Sentence)
                    </div>
                    <div class="editor-field">
                        <p>
                            @Html.EditorFor(model => model.Sentence)
                            <div class="alert error">
                                @Html.ValidationMessageFor(model => model.Sentence)
                            </div>
                        </p>
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.QuestionNumber)
                    </div>
                    <div class="editor-field">
                        <p>
                            @Html.EditorFor(model => model.QuestionNumber)
                            <div class="alert error">
                                @Html.ValidationMessageFor(model => model.QuestionNumber)
                            </div>
                        </p>
                        <div class="alert error">
                            <p>@TempData["Error2"]</p>
                        </div>
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.IsObligatory)
                    </div>
                    <div class="editor-field">
                        <p>
                            @Html.RadioButtonFor(model => model.IsObligatory, 0, true) No Obligatorio
                            @Html.RadioButtonFor(model => model.IsObligatory, 1, false) Obligatoria
                            <div class="alert error">
                                @Html.ValidationMessageFor(model => model.IsObligatory)
                            </div>
                        </p>
                    </div>
                    <p>
                        <input type="submit" value="Crear Pregunta" class="ebutton2 blue" />
                        &nbsp; @Html.ActionLink("Regresar al listado", "Index", routeValues: new { id = ViewBag.Topic.Id }, htmlAttributes: new { @class = "ebutton blue" })
                    </p>
                </fieldset>
            }
        </div>
        <div class="c3 last" id="layout">@Html.Partial("_LayoutSideBar")</div>
    </div>
    &nbsp;
</div>
